package com.yanqu.road.server.manger.maidian.festivalgift;

import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.DataAnalyticsMgr;
import com.yanqu.road.server.manger.log.LogMgr;
import com.yanqu.road.server.manger.maidian.DefaultEventTraceAction;

public class FestivalGiftLog {

    //节日自选礼包购买日志
    private static String FESTIVAL_GIFT_BUY_LOG_EVENT_NAME = "festival_buy";

    /**
     *
     * @param player
     * @param activityId
     * @param mallId
     * @param selectProp
     * @param fixedProp
     */
    public static void trackFestivalGift(GamePlayer player, int activityId, int mallId, String selectProp, String fixedProp) {
        try {
            DefaultEventTraceAction action = new DefaultEventTraceAction(FESTIVAL_GIFT_BUY_LOG_EVENT_NAME, player);
            action.build("activityid", activityId);
            action.build("festival_mallid", mallId);
            action.build("festival_choose", selectProp == null ? "" : selectProp);
            action.build("festival_regular", fixedProp == null ? "" : fixedProp);
            action.trace();
        } catch (Exception e) {
            DataAnalyticsMgr.getLogger().error(" error: ", e);
        }
    }
}
